﻿using Noria.Net.Chaos.Properties;
using System.ComponentModel;
using System.ServiceProcess;

namespace Noria.Net.Chaos
{
    [RunInstaller(true)]
    public class Installer : System.Configuration.Install.Installer
    {
        private ServiceInstaller service;
        private ServiceProcessInstaller installer;

        public Installer()
        {
            this.service = new ServiceInstaller();
            this.installer = new ServiceProcessInstaller();
            // 
            // service
            // 
            this.service.Description = Settings.Default.Description;
            this.service.DisplayName = Settings.Default.DisplayName;
            this.service.ServiceName = Settings.Default.ServiceName;
            this.service.StartType = ServiceStartMode.Automatic;
            // 
            // installer
            // 
            this.installer.Account = ServiceAccount.LocalSystem;
            this.installer.Password = null;
            this.installer.Username = null;
            // 
            // installer
            // 
            base.Installers.AddRange(new System.Configuration.Install.Installer[] {
            this.service,
            this.installer});
        }
    }
}
